package com.fourforfo.fourmall.auth.feign;

import com.fourforfo.common.utils.R;
import com.fourforfo.fourmall.auth.vo.GiteeUserInfoVO;
import com.fourforfo.fourmall.auth.vo.UserLoginVO;
import com.fourforfo.fourmall.auth.vo.UserRegisterVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient("fourmall-member")
public interface MemberFeignService {
    /**
     * 普通注册方法
     * @param registerVO
     * @return
     */
    @ResponseBody
    @PostMapping("/member/member/register")
    R register(@RequestBody UserRegisterVO registerVO);

    /**
     * 普通账号密码登录方法
     * @param loginVO
     * @return
     */
    @ResponseBody
    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVO loginVO);

    /**
     * Gitee登录验证方法
     * @param userInfoVO
     * @return
     */
    @ResponseBody
    @PostMapping("/member/member/oauth2/gitee/login/")
    R giteeLogin(@RequestBody GiteeUserInfoVO userInfoVO);

}
